﻿using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Reflection;
using System.Text;

namespace ZYing.LiquidThemeEngine
{
    internal static class ReflectionHelper
    {
        private static readonly ConcurrentDictionary<String, FakePropertyInfo> Cache = new();
        public static MemberInfo Get(String name)
        {
            return Cache.GetOrAdd(name, Create);
        }
        private static FakePropertyInfo Create(String name)
        {
            return new FakePropertyInfo(name);
        }
        public class FakePropertyInfo : MemberInfo
        {
            public FakePropertyInfo(string name)
            {
                this.Name = name;
            }
            public override Type DeclaringType => throw new NotImplementedException();

            public override MemberTypes MemberType => throw new NotImplementedException();

            public override string Name { get; }

            public override Type ReflectedType => throw new NotImplementedException();

            public override object[] GetCustomAttributes(bool inherit)
            {
                throw new NotImplementedException();
            }

            public override object[] GetCustomAttributes(Type attributeType, bool inherit)
            {
                throw new NotImplementedException();
            }

            public override bool IsDefined(Type attributeType, bool inherit)
            {
                throw new NotImplementedException();
            }
        }
    }
}
